package org.streets.workflow.engine.task;

import org.streets.workflow.engine.ITaskInstance;
import org.streets.workflow.engine.WorkflowEngine;
import org.streets.workflow.engine.WorkflowException;


/**
 * 任务实例终止评价器
 */
public interface ITaskEvaluator {
    /**
     * 判断任务实例是否可以终止
     * @param currentSession
     * @param runtimeContext
     * @param processInstance
     * @param task
     * @return true表示可以终止，false不能终止
     * @throws WorkflowException
     * @throws KernelException
     */
    public boolean eval(WorkflowEngine engine, ITaskInstance task) throws WorkflowException;
}
